home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15018 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.primenet.com!not-for-mail
  2. From: rogersr@primenet.com (Randy Rogers)
  3. Newsgroups: comp.lang.c++
  4. Subject: Overloading ? and Template parameters ?
  5. Date: 2 Apr 1996 22:43:01 -0700
  6. Organization: Primenet
  7. Sender: root@primenet.com
  8. Message-ID: <4jt355$moq@nnrp1.news.primenet.com>
  9. Reply-To: rogersr@primenet.com
  10. X-Posted-By: ip21-211.phx.primenet.com
  11. X-Newsreader: Forte Free Agent 1.0.82
  12.  
  13. I have seen the error of my ways and am now repenting....converting to
  14. c++ from Ada.
  15.  
  16. I have a problem...and no book so I hope there are C++ gurus out there
  17. to further enlighten me on some of the finer points of C++
  18.  
  19. 1. I have an array of records. Each record is several words long.  I
  20. recently entered some code to compare 2 records...ie are they =
  21. all of the sudden I noted that C++ wasnt going to do any type of
  22. record comparison....I used to do that sort of thing with Ada.  How do
  23. I overload the = function to compare 2 records?
  24.  
  25.  
  26. 2. The next question I have concerns the template, class etc.  I have
  27. a template constructed which is a queue.  The queue has access
  28. functions get, put.  What I want is a q function which may be
  29. instantiated to be of any length so I need to pass in a parameter to
  30. dimension the q how is this done in C++?
  31.  
  32.  
  33. If anyone has any helpful pointers or tips on these problems please
  34. email me I would certainly be grateful.
  35.  
  36.  
  37. tia
  38.  
  39. randy rogers
  40.  
  41.